home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / etc / init.d / procps < prev    next >
Text File  |  2008-10-27  |  1KB  |  49 lines

  1. #! /bin/sh
  2. # /etc/init.d/procps: Set kernel variables from /etc/sysctl.conf
  3. #
  4. # written by Elrond <Elrond@Wunder-Nett.org>
  5.  
  6. ### BEGIN INIT INFO
  7. # Provides:          procps
  8. # Required-Start:    mountkernfs
  9. # Required-Stop:
  10. # Default-Start:     S
  11. # Default-Stop:
  12. # Short-Description: Configure kernel parameters at boottime
  13. # Description:  Loads kernel parameters that are specified in /etc/sysctl.conf
  14. ### END INIT INFO
  15.  
  16.  
  17. # Check for existance of the default file and exit if not there,
  18. # Closes #52839 for the boot-floppy people
  19. [ -r /etc/default/rcS ] || exit 0
  20. . /etc/default/rcS
  21. . /lib/lsb/init-functions
  22.  
  23. PATH=/sbin:$PATH
  24. which sysctl > /dev/null || exit 0
  25.  
  26.  
  27. case "$1" in
  28.        start|restart|force-reload)
  29.                quiet="-q"
  30.                if [ "$VERBOSE" = "yes" ]; then
  31.                        quiet=""
  32.                fi
  33.                for file in /etc/sysctl.conf /etc/sysctl.d/*.conf ; do
  34.                  if [ -r "$file" ] ; then
  35.                    log_action_begin_msg "Setting kernel variables ($file)"
  36.                    sysctl $quiet -p "$file"
  37.                    log_action_end_msg $?
  38.                  fi
  39.                done
  40.                ;;
  41.        stop)
  42.                ;;
  43.        *)
  44.                echo "Usage: /etc/init.d/procps {start|stop|restart|force-reload}" >&2
  45.                exit 3
  46.                ;;
  47. esac
  48. exit 0
  49.